package com.edu.utils;

import java.io.FileReader;
import java.io.IOException;
import java.io.Serializable;
import java.util.Properties;

import org.apache.log4j.Logger;

/**
 * @author piggsoft
 * @e-mail piggsoft@163.com
 * @since 2013-4-14
 * @version 1.0
 */
public abstract class PropertiesUtils implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 7638878650884450850L;
	
	protected static final Properties props = new Properties();
	
	private static final Logger LOGGER = Logger.getLogger(PropertiesUtils.class);
	
	public final static void init(String location){
			try {
				props.load(new FileReader(location));
			} catch (IOException e) {
				LOGGER.error(e.getMessage(), e);
				throw new RuntimeException(e);
			}
			LOGGER.info("success init properties on file : " + location);
	}
}
